import store from "../../store";

import { formatDate } from "../Tools";

export function commandDataEncoder(command) {
  return {
    type: "command",
    time: formatDate(new Date()), // 消息产生的时间
    user: store.state.username, // 执行命令的用户名
    content: command, // 命令内容
  };
}